﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MainMenu.master" AutoEventWireup="true"
    CodeBehind="NewCase.aspx.cs" Inherits="IRC.IRepairClouds.WebClient.Cases.NewCase" %>

<%@ Register Src="~/Controls/Common/RadComboCheckBoxList.ascx" TagName="RadComboCheckBoxList"
    TagPrefix="uc" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="pageTitle">
        <h2>
            <asp:Label ID="Label24" CssClass="labelClass" runat="server" Text="Book In"></asp:Label></h2>
    </div>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel" runat="server" Skin="Default">
    </telerik:RadAjaxLoadingPanel>
    <asp:Panel ID="PanelCase" runat="server" CssClass="shrinkBox">
        <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" DecoratedControls="all"
            ControlsToSkip="Scrollbars"></telerik:RadFormDecorator>
        <fieldset>
            <legend>Customer Details</legend>
            <telerik:RadFormDecorator ID="FormDecorator1" runat="server" DecoratedControls="all"
                ControlsToSkip="Scrollbars"></telerik:RadFormDecorator>
            <table>
                <tr>
                    <td>
                        <asp:Label ID="Label4" CssClass="labelClass" runat="server" AssociatedControlID="RadComboBoxCustomer"
                            Text="Customer"></asp:Label>
                    </td>
                    <td colspan="4">
                        <telerik:RadComboBox ID="RadComboBoxCustomer" runat="server" CollapseAnimation-Type="None"
                            CssClass="LongComboClass" ExpandAnimation-Type="None" MarkFirstMatch="True" AllowCustomText="True"
                            Filter="Contains">
                        </telerik:RadComboBox>
                    </td>
                    <td>
                        <asp:ImageButton ID="ImageButtonRemoveCustomer" runat="server" ImageUrl="~/Clients/Images/24x24/clear.png" />
                    </td>
                    <td>
                        <asp:ImageButton ID="ImageButtonCustomerDetail" runat="server" ImageUrl="~/Clients/Images/24x24/add.png" />
                    </td>
                </tr>
                <tr>
                    <td>
                    </td>
                    <td colspan="2">
                        <asp:CheckBox ID="CheckBoxUseCustomerAgain" runat="server" Text="Use customer for the further case."
                            TextAlign="Left" />
                    </td>
                </tr>
            </table>
        </fieldset>
        <fieldset>
            <legend>Case Details</legend>
            <table>
                <tr>
                    <td>
                        <asp:RadioButtonList ID="RadioButtonListCaseType" runat="server" RepeatDirection="Horizontal">
                            <asp:ListItem Selected="True" Value="1">Mobile</asp:ListItem>
                            <asp:ListItem Value="2" Enabled="False">Other</asp:ListItem>
                        </asp:RadioButtonList>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="LabelIMEI" CssClass="labelClass" runat="server" AssociatedControlID="TextBoxIMEI"
                            Text="IMEI"></asp:Label>
                    </td>
                    <td colspan="2">
                        <asp:TextBox Width="300" ID="TextBoxIMEI" runat="server" MaxLength="15"></asp:TextBox>
                    </td>
                    <td>
                        <table>
                            <tr>
                                <td>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidatorIMEI" runat="server" ControlToValidate="TextBoxIMEI"
                                        ErrorMessage="*" ValidationGroup="NewCaseDetail"></asp:RequiredFieldValidator>
                                </td>
                                <td>
                                    <asp:ImageButton ID="ImageButtonImeiHistory" runat="server" ImageUrl="~/Clients/Images/24x24/history.png" />
                                </td>
                            </tr>
                        </table>
                    </td>
                    <td>
                        <asp:Label ID="LabelModel" CssClass="labelClass" runat="server" AssociatedControlID="RadComboBoxModel"
                            Text="Model"></asp:Label>
                    </td>
                    <td colspan="2">
                        <telerik:RadComboBox ID="RadComboBoxModel" CssClass="ComboClass" runat="server" MarkFirstMatch="True"
                            AllowCustomText="True" Filter="Contains" EnableLoadOnDemand="True" EnableVirtualScrolling="True"
                            ShowMoreResultsBox="true" ShowToggleImage="False">
                            <WebServiceSettings Method="Model_Get" Path="../ws/Cases.asmx" />
                        </telerik:RadComboBox>
                    </td>
                    <td>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidatorModel" runat="server" ControlToValidate="RadComboBoxModel"
                            ErrorMessage="*" ValidationGroup="NewCaseDetail"></asp:RequiredFieldValidator>
                    </td>
                    <td>
                        <asp:ImageButton ID="ImageButtonNewModel" runat="server" ImageUrl="~/Clients/Images/24x24/add.png" />
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="LabelFastProblem" CssClass="labelClass" runat="server" AssociatedControlID="RadComboFastProblem"
                            Text="Fast problem"></asp:Label>
                    </td>
                    <td colspan="2">
                        <telerik:RadComboBox ID="RadComboFastProblem" CssClass="ComboClass" runat="server"
                            CollapseAnimation-Type="None" ExpandAnimation-Type="None" MarkFirstMatch="True"
                            AllowCustomText="True" Filter="Contains">
                        </telerik:RadComboBox>
                    </td>
                    <td>
                    </td>
                    <td>
                        <asp:Label ID="LabelPhoneSet" CssClass="labelClass" runat="server" AssociatedControlID="RadComboBoxPhoneSet"
                            Text="PhoneSet"></asp:Label>
                    </td>
                    <td rowspan="2" colspan="2">
                        <uc:RadComboCheckBoxList ID="RadComboBoxPhoneSet" runat="server" EmptyMessage="Select set">
                        </uc:RadComboCheckBoxList>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="LabelDescription" CssClass="labelClass" runat="server" AssociatedControlID="RadTextBoxDescription"
                            Text="Description"></asp:Label>
                    </td>
                    <td colspan="2">
                        <telerik:RadTextBox ID="RadTextBoxDescription" runat="server" Width="100%" TextMode="MultiLine"
                            Rows="5">
                        </telerik:RadTextBox>
                    </td>
                    <td>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidatorDescription" runat="server"
                            ControlToValidate="RadTextBoxDescription" ErrorMessage="*" ValidationGroup="NewCaseDetail"></asp:RequiredFieldValidator>
                    </td>
                    <td>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="LabelCondition" CssClass="labelClass" runat="server" AssociatedControlID="RadComboBoxDeviceCondition"
                            Text="Device condition"></asp:Label>
                    </td>
                    <td colspan="2">
                        <telerik:RadComboBox ID="RadComboBoxDeviceCondition" runat="server" CssClass="ComboClass"
                            CollapseAnimation-Type="None" ExpandAnimation-Type="None" MarkFirstMatch="True"
                            AllowCustomText="True" Filter="Contains">
                        </telerik:RadComboBox>
                    </td>
                </tr>
            </table>
        </fieldset>
        <fieldset>
            <legend>Additional Info</legend>
            <table>
                <tr>
                    <td>
                        <asp:Label ID="LabelDeposit" CssClass="labelClass" runat="server" AssociatedControlID="TextBoxDeposit"
                            Text="Deposit"></asp:Label>
                    </td>
                    <td valign="top">
                        <telerik:RadNumericTextBox ID="TextBoxDeposit" CssClass="smallTextBox" runat="server"
                            Value="0">
                        </telerik:RadNumericTextBox>
                    </td>
                    <td>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidatorEstimatedPrice" runat="server"
                            ControlToValidate="TextBoxEstimatedPrice" ErrorMessage="*" ValidationGroup="NewCaseDetail"></asp:RequiredFieldValidator>
                    </td>
                    <td>
                        <asp:Label ID="LabelEstimatedPrice" CssClass="labelClass" runat="server" AssociatedControlID="TextBoxEstimatedPrice"
                            Text="Estimated price"></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="TextBoxEstimatedPrice" CssClass="smallTextBox" Text="0" runat="server"></asp:TextBox>
                    </td>
                    <td>
                        <asp:Label ID="LabelEstimatedDateCompletion" CssClass="labelClass" runat="server"
                            AssociatedControlID="RadDatePickerEstimatedDateCompletion" Text="Estimated Date"></asp:Label>
                    </td>
                    <td>
                        <telerik:RadDatePicker ID="RadDatePickerEstimatedDateCompletion" runat="server" Calendar-CultureInfo="(Default)"
                            DateInput-DateFormat="dd/MM/yyyy" SelectedDate="<%# DateTime.Now%>">
                            <Calendar ID="Calendar1" runat="server">
                                <SpecialDays>
                                    <telerik:RadCalendarDay Repeatable="Today" Date="" ItemStyle-CssClass="rcToday" />
                                </SpecialDays>
                            </Calendar>
                        </telerik:RadDatePicker>
                    </td>
                    <td>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidatorEstimatedDateCompletion" runat="server"
                            ControlToValidate="RadDatePickerEstimatedDateCompletion" ErrorMessage="*" ValidationGroup="NewCaseDetail"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td>
                        <table>
                            <tr>
                                <td>
                                    <asp:ImageButton ID="ImageButtonNewCaseSave" runat="server" ImageUrl="~/Clients/Images/24x24/ok.png" />
                                </td>
                                <td>
                                    <asp:ImageButton ID="ImageButtonClearCase" runat="server" ImageUrl="~/Clients/Images/24x24/clear.png" />
                                </td>
                                <td align="right">
                                    <asp:Label ID="LabelNewCaseResult" CssClass="labelClass" runat="server" Style="display: none;
                                        font-weight: bold;"></asp:Label>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </fieldset>
    </asp:Panel>
    <asp:Panel ID="PanelHistory" runat="server" CssClass="history">
        <asp:Label ID="Label5" runat="server" Text="History"></asp:Label>
        <hr />
        <asp:Panel ID="PanelHistoryContent" runat="server">
            <telerik:RadGrid ID="RadGridHistory" runat="server" AutoGenerateColumns="False" AllowPaging="True"
                GridLines="None" AllowSorting="True" ShowStatusBar="true">
                <MasterTableView>
                    <RowIndicatorColumn>
                        <HeaderStyle Width="20px"></HeaderStyle>
                    </RowIndicatorColumn>
                    <ExpandCollapseColumn>
                        <HeaderStyle Width="20px"></HeaderStyle>
                    </ExpandCollapseColumn>
                    <Columns>
                        <telerik:GridTemplateColumn UniqueName="Edit" ItemStyle-Width="35px">
                        </telerik:GridTemplateColumn>
                        <telerik:GridBoundColumn DataField="RepairOrderNumber" HeaderText="Repair order number"
                            SortExpression="RepairOrderNumber" UniqueName="RepairOrderNumber">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="CustomerName" HeaderText="Customer name" SortExpression="CustomerName"
                            UniqueName="CustomerName">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="CustomerSurname" HeaderText="Customer surname"
                            SortExpression="CustomerSurname" UniqueName="CustomerSurname">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="CustomerPhone" HeaderText="Customer phone" SortExpression="CustomerPhone"
                            UniqueName="CustomerPhone">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="EstimatedPrice" HeaderText="Estimated price"
                            SortExpression="EstimatedPrice" UniqueName="EstimatedPrice">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="EstimatedDateCompletion" HeaderText="Estimated date completion"
                            SortExpression="EstimatedDateCompletion" UniqueName="EstimatedDateCompletion">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="ProblemDescription" HeaderText="Problem description"
                            SortExpression="ProblemDescription" UniqueName="ProblemDescription">
                        </telerik:GridBoundColumn>
                    </Columns>
                </MasterTableView>
                <PagerStyle AlwaysVisible="true" Mode="NextPrevAndNumeric" />
                <ClientSettings EnableRowHoverStyle="true">
                    <ClientEvents OnCommand="GreeNova.Utils.dummyFunc" />
                </ClientSettings>
            </telerik:RadGrid>
            <telerik:RadToolTipManager ID="RadToolTipManagerLog" runat="server" Sticky="true"
                RenderInPageRoot="true" Position="TopLeft" ManualClose="true" ShowEvent="FromCode">
            </telerik:RadToolTipManager>
        </asp:Panel>
    </asp:Panel>
    <asp:Panel ID="NewModelEditDialog" runat="server" ToolTip="New model" Style="display: none;">
        <asp:Panel ID="NewModelEditDialogWindow" runat="server" Style="overflow: hidden;">
            <table cellspacing="0" class="appelement">
                <tr>
                    <td valign="top">
                        <asp:Label ID="LabelManufacturerSelect" runat="server" Text="Manufacturer(select):"
                            AssociatedControlID="RadComboBoxManufacturer"></asp:Label>
                    </td>
                    <td colspan="2">
                        <telerik:RadComboBox ID="RadComboBoxManufacturer" CssClass="ComboClass" runat="server"
                            MarkFirstMatch="True" AllowCustomText="True" Filter="Contains" EnableLoadOnDemand="True"
                            EnableVirtualScrolling="True" ShowMoreResultsBox="true" ShowToggleImage="False">
                            <WebServiceSettings Method="Manufacturer_Get" Path="../ws/Cases.asmx" />
                        </telerik:RadComboBox>
                    </td>
                </tr>
                <tr>
                    <td valign="top">
                        <asp:Label ID="LabelManufacturerNew" runat="server" Text="Manufacturer(new):" AssociatedControlID="TextBoxManufacturer"></asp:Label>
                    </td>
                    <td valign="top" class="nowrap" colspan="2">
                        <asp:TextBox ID="TextBoxManufacturer" Width="98%" runat="server" MaxLength="255"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <asp:Label ID="LabelManufactureValidator" runat="server" Text="" ForeColor="Red"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td valign="top">
                        <asp:Label ID="Label2" runat="server" Text="Model:" AssociatedControlID="TextBoxModel"></asp:Label>
                    </td>
                    <td valign="top" class="nowrap">
                        <asp:TextBox ID="TextBoxModel" runat="server" Width="98%" MaxLength="255"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <asp:Label ID="LabelModelValidator" runat="server" Text="" ForeColor="Red"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <table cellspacing="0" style="width: auto; height: auto;">
                            <tr>
                                <td>
                                    <asp:ImageButton ID="ImageButtonEditModelOk" runat="server" ImageUrl="~/Clients/Images/24x24/ok.png" />
                                </td>
                                <td>
                                    <asp:ImageButton ID="ImageButtonEditModelClose" runat="server" ImageUrl="~/Clients/Images/24x24/clear.png" />
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </asp:Panel>
    </asp:Panel>
    <asp:Panel ID="PanelCustomerDetail" runat="server" ToolTip="Customer's detail" Style="display: none;">
        <asp:Panel ID="PanelCustomerDetailDialogWindow" runat="server" Style="overflow: hidden;">
            <table cellspacing="0" class="appelement">
                <tr>
                    <td>
                        <asp:Label ID="Label3" CssClass="labelClass" runat="server" AssociatedControlID="TextBoxFirstName"
                            Text="First Name"></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="TextBoxFirstName" CssClass="TextBoxClass" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <asp:Label ID="LabelFirstNameValidator" runat="server" Text="" ForeColor="Red"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="Label6" CssClass="labelClass" runat="server" AssociatedControlID="TextBoxLastName"
                            Text="Last Name"></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="TextBoxLastName" CssClass="TextBoxClass" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <asp:Label ID="LabelLastNameValidator" runat="server" Text="" ForeColor="Red"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="Label7" CssClass="labelClass" runat="server" AssociatedControlID="TextBoxEmail"
                            Text="Email"></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="TextBoxEmail" CssClass="TextBoxClass" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <asp:Label ID="LabelEmailValidator" runat="server" Text="" ForeColor="Red"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="Label8" CssClass="labelClass" runat="server" AssociatedControlID="TextBoxPhone"
                            Text="Phone"></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="TextBoxPhone" CssClass="TextBoxClass" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <asp:Label ID="LabelPhoneValidator" runat="server" Text="" ForeColor="Red"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <table cellspacing="0" style="width: auto; height: auto;">
                            <tr>
                                <td>
                                    <asp:ImageButton ID="ImageButtonEditCustomerOk" runat="server" ImageUrl="~/Clients/Images/24x24/ok.png" />
                                </td>
                                <td>
                                    <asp:ImageButton ID="ImageButtonEditCustomerClose" runat="server" ImageUrl="~/Clients/Images/24x24/clear.png" />
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </asp:Panel>
    </asp:Panel>
    <asp:Panel ID="PanelImeiHistory" runat="server" ToolTip="Case history" Style="display: none;">
        <asp:Panel ID="PanelImeiHistoryDialogOpen" runat="server" Style="overflow: hidden;">
            <telerik:RadGrid ID="RadGridImeiHistory" runat="server" AutoGenerateColumns="False"
                AllowPaging="True" GridLines="None" AllowSorting="True" ShowStatusBar="true">
                <MasterTableView>
                    <RowIndicatorColumn>
                        <HeaderStyle Width="20px"></HeaderStyle>
                    </RowIndicatorColumn>
                    <ExpandCollapseColumn>
                        <HeaderStyle Width="20px"></HeaderStyle>
                    </ExpandCollapseColumn>
                    <Columns>
                        <telerik:GridTemplateColumn UniqueName="UseDetail" ItemStyle-Width="35px">
                        </telerik:GridTemplateColumn>
                        <telerik:GridBoundColumn DataField="RepairOrderNumber" HeaderText="Repair order number"
                            SortExpression="RepairOrderNumber" UniqueName="RepairOrderNumber">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="CustomerName" HeaderText="Customer name" SortExpression="CustomerName"
                            UniqueName="CustomerName">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="CustomerSurname" HeaderText="Customer surname"
                            SortExpression="CustomerSurname" UniqueName="CustomerSurname">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="CustomerPhone" HeaderText="Customer phone" SortExpression="CustomerPhone"
                            UniqueName="CustomerPhone">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="EstimatedPrice" HeaderText="Estimated price"
                            SortExpression="EstimatedPrice" UniqueName="EstimatedPrice">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="EstimatedDateCompletion" HeaderText="Estimated date completion"
                            SortExpression="EstimatedDateCompletion" UniqueName="EstimatedDateCompletion">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="ProblemDescription" HeaderText="Problem description"
                            SortExpression="ProblemDescription" UniqueName="ProblemDescription">
                        </telerik:GridBoundColumn>
                    </Columns>
                </MasterTableView>
                <PagerStyle AlwaysVisible="true" Mode="NextPrevAndNumeric" />
                <ClientSettings EnableRowHoverStyle="true">
                    <ClientEvents OnCommand="GreeNova.Utils.dummyFunc" />
                </ClientSettings>
            </telerik:RadGrid>
            <table cellspacing="0" class="appelement">
                <tr>
                    <td colspan="2">
                        <table cellspacing="0" style="width: auto; height: auto;">
                            <tr>
                                <td>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:ImageButton ID="ImageButtonImeiHistoryOk" runat="server" ImageUrl="~/Clients/Images/24x24/ok.png" />
                                </td>
                                <td>
                                    <asp:ImageButton ID="ImageButtonImeiHistoryClose" runat="server" ImageUrl="~/Clients/Images/24x24/clear.png" />
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </asp:Panel>
    </asp:Panel>
</asp:Content>
